package com.linked.commonentity.basemanage.deletebak;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author Bluerain
 * @version 1.0
 * @data 2024/12/31 9:13
 * @describe todo
 */
@Data
public class LinkedDeleteBak {

    /**
     * 删除备份表主键
     */
    private String deleteBakId;
    /**
     * 删除的用户
     */
    private String userId;
    /**
     * 删除数据表主键
     */
    private String tableId;
    /**
     * 删除数据表名称
     */
    private String tableName;
    /**
     * 跟踪id
     */
    private String traceId;
    /**
     * 删除内容json
     */
    private String bakInfo;
    /**
     * 删除时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime = LocalDateTime.now();
    /**
     * 备注
     */
    private String remark;

    public static LinkedDeleteBak builder() {
        return new LinkedDeleteBak();
    }

    public LinkedDeleteBak withUserId(String userId) {
        this.userId = userId;
        return this;
    }

    public LinkedDeleteBak withTableId(String tableId) {
        this.tableId = tableId;
        return this;
    }

    public LinkedDeleteBak withTableName(String tableName) {
        this.tableName = tableName;
        return this;
    }

    public LinkedDeleteBak withTraceId(String traceId) {
        this.traceId = traceId;
        return this;
    }

    public LinkedDeleteBak withBakInfo(String bakInfo) {
        this.bakInfo = bakInfo;
        return this;
    }

    public LinkedDeleteBak withRemark(String remark) {
        this.remark = remark;
        return this;
    }

}
